<template>
	<view class="content bg-#F6F9F8 h-100vh photo_back">

		<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme"/>

		<view class="photo_s1_1">
			<view class="photo_s1_1_one" v-for="(item,index) in step_1">
				<view class="photo_s1_1_one_1">
					<image :src="item.img" />
				</view>
				<view class="photo_s1_1_one_2">
					<view class="photo_s1_1_one_2_1">{{item.title}}</view>
					<view class="photo_s1_1_one_2_2">{{item.text}}</view>
				</view>
			</view>
		</view>


		<view class="photo_s1_2">

			<image :src="ex_photo" />
		</view>

		<view class="photo_s1_3">
			首次拍摄需要拍<text>5张</text>头像用于AIGC服务
		</view>

		<view class="photo_s1_4"
			@tap="this.navigateTo(`/pagesB/photo/photo_step_3?spot_id=${spot_id}&points_id=${points_id}`);">
			开始拍摄
		</view>

	</view>

</template>

<script>
	import {
		navigateTo,
		navigateBack
	} from "@/hooks";
	import custom_navbar from "./components/photo.vue";
	// import uParse from '@/components/u-parse/u-parse.vue';
	import store from "@/store";


	export default {
		components: {
			custom_navbar
			// uParse
		},
		data() {
			return {
				navigateTo,
				navigateBack,
				navbar_title: "AI旅拍",
				statusBarHeight: 20,
				points_id: '',
				spot_id: '',
				theme: 'drak',
				step_1: [{
						"title": '第1步',
						'text': '打卡景点',
						'img': '/static/images/photo_2.png'
					},
					{
						"title": '第2步',
						'text': '拍摄头像',
						'img': '/static/images/photo_3.png'
					},
					{
						"title": '第3步',
						'text': '等待AI生成',
						'img': '/static/images/photo_4.png'
					}
				],

				ex_photo: 'https://resources.ym2meta.com/ai_tour/assets/ai_photo/photo_5.png'


			};
		},
		computed: {
			rec_url() {
				return this.$store.getters.rec_url;
			}


		},
		onPageScroll(e) {
			
			if (e.scrollTop > 50) {
				this.theme = 'white';

			} else {

				this.theme = 'drak';
			}
			
		},
		mounted() {
			let that = this;
			const info = uni.getSystemInfoSync();
			that.statusBarHeight = info.statusBarHeight + 43;

		},

		onLoad(options) {
			this.points_id = options.points_id;
			this.spot_id = options.spot_id;
		},
		methods: {

			// 获取头的高度
			getNavHeight(e) {
				this.NavHeight_infoHeight += e;
			},
		}
	}
</script>

<style lang="scss" scoped>
	image {
		width: 100%;
		height: 100%;
	}

	 @import './this.scss';
	

	.photo_s1_1 {
		width: 94%;
		margin-left: 3%;
		margin-top: 36rpx;
		display: flex;
		justify-content: space-between;

		.photo_s1_1_one {
			width: 220rpx;
			overflow: hidden;

			.photo_s1_1_one_1 {
				width: 120rpx;
				height: 120rpx;
				margin-left: 50rpx;
				z-index: 9;

				image {
					width: 100%;
					height: 100%;
				}

			}

			.photo_s1_1_one_2 {
				width: 220rpx;
				height: 200rpx;
				background: rgba(255, 255, 255, 0.7);
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				margin-top: -60rpx;
				z-index: -9;
				overflow: hidden;

				.photo_s1_1_one_2_1 {
					margin-left: 66rpx;
					margin-top: 80rpx;
					width: 88rpx;
					height: 40rpx;
					background: #FFDF01;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					color: #3D3D3D;
					font-size: 24rpx;
					font-weight: bold;
					display: flex;
					justify-content: center;
					align-items: center;


				}

				.photo_s1_1_one_2_2 {

					margin-top: 20rpx;
					width: 100%;


					color: #3D3D3D;
					font-size: 28rpx;
					font-weight: 400;
					display: flex;
					justify-content: center;
					align-items: center;
				}

			}
		}
	}

	.photo_s1_2 {
		margin: 44rpx auto 0 auto;

		width: 558rpx;
		height: 860rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.photo_s1_3 {
		width: 100%;
		display: flex;
		justify-content: center;
		margin-top: 38rpx;
		color: #666666;
		font-size: 24rpx;
		font-weight: 400;

		text {
			color: #0CCA92;
		}
	}

	.photo_s1_4 {
		width: 702rpx;
		margin: 24rpx auto 36rpx auto;
		color: #FFFFFF;
		font-size: 30rpx;
		font-weight: bold;
		display: flex;
		justify-content: center;
		align-items: center;
		height: 80rpx;
		background: linear-gradient(90deg, #0FBCD6 0%, #0CCA91 100%);
		border-radius: 40rpx 40rpx 40rpx 40rpx;
	}
</style>